package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

/**
 * ClassName:IsDeletedFlagEnum
 * Package:IntelliJ IDEA
 * Description: 分类类型枚举
 *
 * @Author xiaoming
 * @Create 2025/2/18 19:20
 * @Version 1.0
 */
@Getter
public enum CategoryEnum {
    PRIMARY(1, "岗位大类"),
    SECOND(2, "二级分类");

    public int code;
    public String desc;

    CategoryEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CategoryEnum getByCode(int codeVal) {
        for (CategoryEnum categoryEnum : CategoryEnum.values()) {
            if (categoryEnum.code == codeVal) {
                return categoryEnum;
            }
        }
        return null;
    }
}
